package novel.common.test;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by sutong on 2017/4/6.
 */
public class SourceA {
    private List<String> list=new ArrayList<String>();
    public  synchronized void getSource(){
        for (int i = 0; i < list.size(); i++) {
            System.out.println(list.get(i));
        }
    }
    public synchronized void setSource(String id){
        list.add(id);
    }
}
